﻿using SuperX.Common.APIManager;
using SuperX.Common.Helper;
using System.Reflection;

namespace SuperX.SuperSocket
{
    public class ActionInfo
    {
        /// <summary>
        /// 方法名
        /// </summary>
        public string MethodName { get; set; }

        /// <summary>
        /// 类型
        /// </summary>
        public IAPIController TypeObject { get; set; }

        /// <summary>
        /// 方法信息
        /// </summary>
        public MethodInfo MethodInfo { get; set; }

        /// <summary>
        /// 参数信息
        /// </summary>
        public string[] Params { get; set; }

        /// <summary>
        /// 参数信息
        /// </summary>
        public string Returns { get; set; }

        /// <summary>
        ///
        /// </summary>
        public FastInvokeHandler Handler { get; set; }

        public object Invoke(object[] args)
        {
            return Handler.Invoke(TypeObject, args);
        }
    }
}